<template>
    <div>
        demo
        <button @click="clickFnc">触发自定义事件</button>
        <slot></slot>
        <slot name="aaa"></slot>
    </div>
</template>
<script>
export default {
    name:'DemoEx',
    comments:{},
    props:['msg'],
    emits:['clickFnc'],//
    setup(props,context){
        console.log(context.slots)//上下问对象
        console.log(props.msg)
       function clickFnc(){
           context.emit('clickFnc',props.msg)
       }
       return {
           clickFnc
       }
    }
}
</script>